#pragma once
#include <iostream>
#include <stdlib.h>

using namespace std;

class Data
{
public:
	Data(int year = 1, int month = 1, int day = 1);
	//Data(Data& d);
	void Print();
	bool operator==(Data& d);
	bool operator!=(Data& d);
	bool operator>(Data& d);
	bool operator>=(Data& d);
	bool operator<(Data& d);
	bool operator<=(Data& d);
	Data& operator+=(int day);
	Data operator+(int day);
	Data& operator-=(int day);
	Data operator-(int day);

	//Data operator-(Data& d);

	int GetMonthDay(int year, int month)
	{
		int days[13] = { -1,31,28,31,30,31,30,31,31,30,31,30, 31};
		if (month == 2 && (year % 4 == 0 && year % 100 != 0) || (year % 400 == 0))
		{
			return 29;
		}
		else
			return days[month];
	}
private:
	int _year;
	int _month;
	int _day;
};

